package diary

type DiaryService struct {
	repository DiaryRepository
}

func NewDiaryService(repository DiaryRepository) *DiaryService {
	return &DiaryService{repository: repository}
}

func (t *DiaryService) AddDiary(diary *DiaryEntity) error {
	return t.repository.AddDiary(diary)
}

func (t *DiaryService) GetDiary(id int64) (*DiaryEntity, error) {
	return t.repository.GetDiary(id)
}

func (t *DiaryService) UpdateDiary(diary *DiaryEntity) error {
	return t.repository.UpdateDiary(diary)
}

func (t *DiaryService) DeleteDiary(id int64) error {
	return t.repository.DeleteDiary(id)
}
